package api.apiservice.apiopenplat;

import java.util.regex.Pattern;

public class test {

    public static void main(String[] args) {
        String test = "/api/showallapi";
        String[] split = test.split("/");
        String pattern = "^[A-Za-z0-9]+$";
        boolean isCorrect = true;
        for (int i = 1 ; i < split.length;i++){
            isCorrect  = Pattern.matches(pattern, split[i]);
        }
        if (isCorrect){
            System.out.println("符合规则");
        }
    }

}
